<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/styleleft.css"  medial="all" />
<link rel="stylesheet" type="text/css" href="../css/styleleft.css" medial="all" />
<link rel="stylesheet" type="text/css" href="../css/style.css" medial="all" />
</head>

<body>
<div class="leftside">
	<div class="product">
		<h2 class="moduletitle" >Bánh và hoa</h2>
		<div class="modulecontent">
		 <?php 
			if( @fopen('Utilities/connect.php',"r"))
			{
			 include ('/Utilities/connect.php'); 
		 	}
			 else include ('../Utilities/connect.php'); 
		 function getCategoryForMenu($parentId)
			{
                        $conn=  getConnect();
                        mysql_set_charset('utf8',$conn);
 			$sql ="select * from categories where isVisable=1 and ParentID= $parentId";
			mysql_set_charset('utf8',getConnect());
			$rl=mysql_query($sql, getConnect());
			
			$arr=array();
			while ($category = mysql_fetch_array($rl))
			{
		 	$arr[]=$category;
			}
			return $arr;	
	
			}
		 ?>
			
			
		<ul>
		<li><a href="">Bánh</a>
			<ul>
			<?php
			 $cakes =getCategoryForMenu(1);
			 foreach ($cakes as $cake)
			 {
			 
			 	?>
				<li><a href="/cfshop/Product/ProductByCategory.php?categoryId= <?php echo $cake[0]; ?>&&name=<?php echo $cake[1]?>"><?php echo $cake[1]; ?></a></li>
			 <?php } ?>
				<!--<li><a href="">Bánh Noel</a></li>
				<li><a href="">Bánh sinh nhật</a></li>
				<li><a href="">Bánh cưới</a></li>
				<li><a href="">Quà Valentine</a></li>-->
			</ul>
		</li>
		<li><a href="">HOa</a>
			<ul>
			<?php
			 $flowers =getCategoryForMenu(2); 
			 foreach ($flowers as $flower)
			 {
			 
			 	?>
				<li><a href="/cfshop/Product/ProductByCategory.php?categoryId= <?php echo $flower[0]; ?>&&name=<?php echo $flower[1]?>"><?php echo $flower[1]; ?></a></li>
			 <?php } ?>
				<!--<li><a href="">Hoa Bó</a></li>
				<li><a href="">Hoa cưới</a></li>
				<li><a href="">Hoa giỏ</a></li>
				<li><a href="">Hoa ainh nhật</a></li>-->
			</ul>
		</li>
		</ul>
		</div>
	</div>
	<div class="support">
		<h2 class="moduletitle" >Support online</h2>
		<div class="modulecontent">
		<p class="psupport">
    <a class="FootLink" href="ymsgr:sendim?catthuytinh12b6&amp;m=Hey, I am from C2C" title="Call me"> <img a="" alt="Hỗ trợ trực tuyến" class="FootLink" href="ymsgr:sendim?catthuytinh12b6&amp;m=Hey, I am from C2C" img="" src="http://opi.yahoo.com/online?u=catthuytinh12b6&amp;m=g&amp;t=2" style="border-width:0px; height: 30px; width: 125px;" title="Call me" />Online1</a></p>
<p class="psupport">
    <a class="FootLink" href="ymsgr:sendim?catthuytinh12b6&amp;m=Hey, I am from C2C" title="Call me"> <img a="" alt="Hỗ trợ trực tuyến" class="FootLink" href="ymsgr:sendim?catthuytinh12b6&amp;m=Hey, I am from C2C" img="" src="http://opi.yahoo.com/online?u=catthuytinh12b6&amp;m=g&amp;t=2" style="border-width:0px; height: 30px; width: 125px;" title="Call me" />Online2</a></p>
		</div>
	</div>
	<div class="thanhtoan">
		<h2 class="moduletitle" >Thanh toán</h2>
		<div class="modulecontent">
		<?php if( @fopen('images/img_payment.png',"r"))
			{
			 echo "<img src='images/img_payment.png'/>"; 
		 	}
			 else echo "<img src='../images/img_payment.png'/>" ?>
				
		</div>
	</div>
</div>
</body>
</html>
